import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';

import '../controller/UpdateController.dart';

class AddressMiddleware extends GetMiddleware {
  @override
  RouteSettings? redirect(String? route) {
    final controller = Get.find<UpdateController>();
    if (route == '/deliveryAddress') {
      controller.getGoodsList();
    }
    return super.redirect(route);
  }
}
